package com.zjy.software.day14;

public class MyThread extends Thread{
    @Override
    public void run() {
        System.out.println("我是继承Thread实现的线程   MyThread.run  我是线程执行时候的代码");
        for (int i = 0; i < 1000; i++) {
            if (i % 100==0){
                Thread.yield();
                System.out.println("你执行的太辛苦了,需要休息下"+i);
            }
            System.out.println("MyThread.run -----------------  "+i);
        }
    }
}
